package cn.chencaiju.App;

import javax.swing.JFrame;

@SuppressWarnings("serial")
public class MyTankGame4 extends JFrame {

    MyPanel p1 = null;

    public MyTankGame4() {
        p1 = new MyPanel();
        Thread t = new Thread(p1);
        t.start();
        add(p1);
        setExtendedState(JFrame.MAXIMIZED_BOTH); 
        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        addKeyListener(p1);// 注册监听

    }

    public static void main(String[] args) {
        new MyTankGame4();
    }
}